package com.dks.controller.publicCompoment;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import com.dks.dto.publicCompoment.PublicThumbsUpDto;
import com.dks.models.publicCompoment.PublicThumbsUp;
import com.dks.repository.IPublicThumbsUpRepository;
import com.dks.result.ResultModel;

/**
 * 公共-点赞
 */
@RestController
@RequestMapping("thumbs-up")
public class PublicThumbsUpController{

    @Autowired
    private IPublicThumbsUpRepository publicThumbsUpRepository;


    /**
     * 点赞/取消点赞
     * @author evan
     */
    @PostMapping("")
    public ResultModel<PublicThumbsUp> thumbsUp(@RequestBody @Validated PublicThumbsUpDto publicThumbsUpDto) {
        return publicThumbsUpRepository.thumbsUp(publicThumbsUpDto);
    }

}
